<template>
  <f7-page>
    <f7-navbar title="个人资料" back-link="Back"></f7-navbar>
    <f7-list inline-labels no-hairlines-md>
      <f7-list-input label="用户名" type="text" clear-button disabled v-model="Username"></f7-list-input>
      <f7-list-input label="密码" type="text" clear-button disabled v-model="Password"></f7-list-input>
      <f7-list-input label="拥有人" type="text" clear-button disabled v-model="RealName"></f7-list-input>
      <f7-list-input label="联系方式" type="text" clear-button disabled v-model="Contact"></f7-list-input>
      <f7-list-input label="创建时间" type="text" clear-button disabled v-model="Creationdate"></f7-list-input>
    </f7-list>
  </f7-page>
</template>
<script>
import axios from "axios";
export default {
  data() {
    return {
      Username: "",
      Password: "",
      RealName: "",
      Contact: "",
      Creationdate: ""
    };
  },
  mounted() {
    this.selectUserXiangqing();
  },
  methods: {
    selectUserXiangqing() {
      const self = this;
      const app = self.$f7;
      URL = "/caofuying/user/selectUserXiangqing";
      axios
        .get(URL, {
          params: {
            Username: this.$store.state.apiLogin.Username,
            Password: this.$store.state.apiLogin.Password
          }
        })
        .then(r => {
          const { data } = r;
          if (data != null) {
            this.Username = data.Username;
            this.Password = data.Password;
            this.RealName = data.RealName;
            this.Contact = data.Contact;
            this.Creationdate = data.Creationdate;
          } else {
            app.dialog.alert("服务器错误");
          }
        });
    }
  }
};
</script>
<style scoped>
.disabled {
  margin-top: 10%;
}
</style>
